package com.fqgj.sentry.policy.engine.domain;

import com.fqgj.sentry.policy.engine.domain.enums.ConditionComposeEnum;
import com.fqgj.sentry.policy.engine.domain.enums.ConditionGroupTypeEnum;

import java.io.Serializable;
import java.util.List;

/**
 * Created by kennykong on 2017/7/13.
 */
public class ConditionGroup implements Serializable {

    /**
     * 条件组类型：单条件|条件组|系统内置条件
     */
    private ConditionGroupTypeEnum conditionGroupType;

    /**
     * 条件之间的组合关系：与|或
     */
    private ConditionComposeEnum conditionCompose;

    /**
     * 条件
     */
    private List<Condition> conditions;


    /**
     * 如果击中的算分方式
     */
    private ScoreCalculator scoreCalculator;

    /**
     * 结果
     */
    private ConditionGroupResult conditionGroupResult;


    public ConditionGroupTypeEnum getConditionGroupType() {
        return conditionGroupType;
    }

    public ConditionGroup setConditionGroupType(ConditionGroupTypeEnum conditionGroupType) {
        this.conditionGroupType = conditionGroupType;
        return this;
    }

    public ConditionComposeEnum getConditionCompose() {
        return conditionCompose;
    }

    public ConditionGroup setConditionCompose(ConditionComposeEnum conditionCompose) {
        this.conditionCompose = conditionCompose;
        return this;
    }

    public List<Condition> getConditions() {
        return conditions;
    }

    public ConditionGroup setConditions(List<Condition> conditions) {
        this.conditions = conditions;
        return this;
    }

    public ScoreCalculator getScoreCalculator() {
        return scoreCalculator;
    }

    public ConditionGroup setScoreCalculator(ScoreCalculator scoreCalculator) {
        this.scoreCalculator = scoreCalculator;
        return this;
    }

    public ConditionGroupResult getConditionGroupResult() {
        return conditionGroupResult;
    }

    public ConditionGroup setConditionGroupResult(ConditionGroupResult conditionGroupResult) {
        this.conditionGroupResult = conditionGroupResult;
        return this;
    }

}
